package com.kd.juhaowan.ui;

import android.os.Bundle;
import android.widget.ImageView;

import androidx.annotation.Nullable;

import com.bumptech.glide.Glide;

import com.kd.juhaowan.R;
import com.kd.juhaowan.http.model.ActivityModel;
import com.kd.juhaowan.utils.GlideHelper;

import butterknife.BindView;
import butterknife.OnClick;

public class ActivityActivity extends BaseActivity {



    @BindView(R.id.activity_image)
    ImageView imageView;
    @BindView(R.id.activity_close)
    ImageView closeView;


    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        ActivityModel model = (ActivityModel)getIntent().getSerializableExtra("model");
//        imageView.setMaxWidth(UIUtil.getScreenWidth(ActivityActivity.this)-40);
//        model.setImage("https://apk.iyingyao.com/01yx/file/upload/20240320/8254a954e9077ccfbaeda4ece6278abf.png");
        GlideHelper.loadGoodsCover(Glide.with(imageView),imageView,model.getImage());

    }


    @Override
    protected void reInitDate() {

    }

    @OnClick(R.id.activity_image)
    public void onConfirmClick(){
        setResult(RESULT_OK);
        finish();
    }
    @OnClick(R.id.activity_close)
    public void onCancelClick(){
        setResult(RESULT_CANCELED);
        finish();
    }


    @Override
    protected int getViewLayoutResourceId() {
        return R.layout.activity_activity;
    }




}
